{% load static %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="{% static 'web/css/common.css' %}">
    <link rel="stylesheet" href="{% static 'web/css/bootstrap.css' %}">
</head>
<body>
<div class="container">
    <h1 class="form-heading">login Form</h1>
    <div class="login-form">
        <div class="main-div">
            <div class="panel">
                <h2 style="font-size:26px;">点 餐 系 统 登 录 页 面</h2>
            </div>
            <form action="{% url 'web_dologin' %}" method="post">
                {% csrf_token %}
                <div class="form-group">
                    <select name="shop_id" class="form-control">
                        <option value="0"> - - 请选择商铺名称 - -</option>
                        {% for shop in shop_list %}
                            <option value="{{ shop.id }}">{{ shop.name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="form-group">
                    <input type="text" name="username" class="form-control" placeholder="登录账号">
                </div>
                <div class="form-group">
                    <input type="password" name="password" class="form-control" placeholder="登录密码">
                </div>
                <div class="form-group">
                    <input type="text" name="code" style="display:inline;width:120px;float:left;" class="form-control" placeholder="验证码">
                    <img src="{% url 'web_verify' %}"/>
                </div>

                <button type="submit" style="margin-top:10px" class="btn btn-primary">登录</button>

                <div class="form-group">
                    <p class="login-box-msg" style="color:red">
                        {% if request.GET.errinfo == '1' %}
                            请选择的店铺名称！
                        {% elif request.GET.errinfo == '2' %}
                            验证码错误！
                        {% elif request.GET.errinfo == '3' %}
                            此账号不存在！
                        {% elif request.GET.errinfo == '4' %}
                            无效的账号！
                        {% elif request.GET.errinfo == '5' %}
                            账号密码错误！
                        {% endif %}
                    </p>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="{% static 'web/js/jquery.min.js' %}"></script>
<script src="{% static 'web/js/bootstrap.min.js' %}"></script>
</body>
</html>